package com.lening.iot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.iot.dao.HamangerDAO;
import com.lening.iot.dto.HamangerDTO;
import com.lening.iot.po.HamangerPO;
import com.lening.iot.service.IHamangerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 10:55
 */
@Service
public class HamangerServiceImpl extends BaseServiceImpl<HamangerDAO, HamangerPO, HamangerDTO> implements IHamangerService {
    @Autowired(required = false)
    private HamangerDAO hamangerDAO;

    @Override
    public Page<HamangerDTO> getAllHam(Page<HamangerDTO> hamangerDTOPage) {
        Page<HamangerDTO> hamList = hamangerDAO.getAllHam(hamangerDTOPage);
        return hamList;
    }

    @Override
    public List<HamangerDTO> getAll(String communityname) {
        return hamangerDAO.getAll(communityname);
    }

    @Override
    public Page<?> page(HamangerDTO hamangerDTO) {
        return hamangerDAO.getAllHam(hamangerDTO);
    }

    @Override
    public HamangerPO getById(Long id) {
        return this.hamangerDAO.getById(id);
    }
}
